package com.um.jdy.platform.shop.controller;

import com.um.jdy.platform.shop.entity.dto.OrderCommentPageDTO;
import com.um.jdy.platform.shop.entity.vo.OrderCommentItemVO;
import com.um.jdy.platform.shop.manager.OrderCommentManager;
import com.um.jdy.common.shop.service.OrderCommentService;
import com.um.jdy.common.shop.entity.po.OrderComment;
import com.um.jdy.common.shop.entity.dto.OrderCommentDTO;
import com.um.jdy.common.shop.entity.vo.OrderCommentVO;
import com.um.springboot.starter.annotation.ApiPermission;
import com.um.springboot.starter.annotation.TokenRequired;
import com.um.springboot.starter.entity.Page;
import com.um.springboot.starter.orm.controller.BasePlusController;
import com.um.springboot.starter.orm.entity.Response;
import com.um.springboot.starter.orm.params.ListDTO;
import com.um.springboot.starter.orm.params.PageDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

/**
 * 控制器：订单评论表
 */
@RestController
@RequestMapping("/api/v1/cms/shop/order_comment")
@Api(tags = "OrderCommentController", description = "订单评论表")
@ApiPermission("order_comment")
@TokenRequired
public class OrderCommentController extends BasePlusController<OrderCommentManager,OrderCommentService,OrderComment,OrderCommentDTO,OrderCommentVO, PageDTO, ListDTO> {

    @ApiPermission("page")
    @ApiOperation("分页查询评论")
    @PostMapping("get_page")
    public Response<Page<OrderCommentItemVO>> getPage(@RequestBody OrderCommentPageDTO params) {
        return Response.success(manager.getPage(params));
    }
}
